<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="../common.jsp"%>
<style type="text/css">
.hide{
	display: none;
}
</style>
<script type="text/javascript">
		$(document).ready(
			
			function() {
				$("#userRoleMapping").attr("action",'<c:url value="/assignRole.htm"></c:url>');
				
			});
</script>
<form:form action="" commandName="userRoleMapping" id="userRoleMapping">
	<div style="width: 100%;">
		<table class="adminFilterTable">
				<form:hidden path="userId" id="userName" value="${userName}"></form:hidden>
			<tr class="tableChildHeaderColor">
				<td colspan="5" align="center"><img alt="" src="./customTheme/Icons/BlueLotus_DMS_icons-09.png"> ASSIGN ROLES </td>
			</tr>
			<tr class="formSpacingRow"><td></td> </tr>
			<tr class="formSpacingRow"><td></td> </tr>
			<tr>
				<td class="spacingColumnWidthLess"></td>
				<td class="formLabel"> User ID </td>
				<td class="spacingColumnWidthLess"></td>
				<td align="left" class="formLabel">
					<table>
						<tr align="left">
							<td> <c:out value="${userName}"></c:out>  </td>
						</tr>
					</table> 
				</td>
				<td class="spacingColumnWidthLess"></td>
			</tr>
			<tr class="formSpacingRow"><td></td> </tr>
			<tr>
				<td class="spacingColumnWidthLess"></td>
				<td class="formLabel"> User Name </td>
				<td class="spacingColumnWidthLess"></td>
				<td class="formLabel" align="left">
					<table>
						<tr align="left">
							<td>  <c:out value="${userDisplayName}"></c:out> </td>
						</tr>
					</table> 
				</td>
				<td class="spacingColumnWidthLess"></td>
			</tr>
			<tr class="formSpacingRow"><td></td> </tr>
			<tr>
				<td class="spacingColumnWidthLess"></td>
				<td class="formLabel"> Roles </td>
				<td class="spacingColumnWidthLess"></td>
				<td class="formLabel"> 
					<%-- <table>
						<c:forEach items="${differentAppRoleList}" var="item">
							<form:checkbox path="roles" value="${item.roleId}" cssClass="hide"/>
						</c:forEach>
						<c:forEach var="roleList" items="${roleList}">
							<tr>
								<form:checkbox path="roles" value="${roleList.roleId}" label="${roleList.roleDesc}"/>
							</tr>
						</c:forEach>
					</table> --%>
					<table>
						<c:forEach var="roleList" items="${roleList}">
							<tr>
								<form:checkbox path="roles" value="${roleList.roleId}" label="${roleList.roleDesc}"/>
							</tr>
						</c:forEach>
					</table>
				</td>
				<td class="spacingColumnWidthLess"></td>
			</tr>	
			<tr class="formSpacingRow"><td></td> </tr>
			<tr align="left">
				<td class="spacingColumnWidthLess"></td>
				<td></td>
				<td class="spacingColumnWidthLess"></td>
				<td colspan="2">
					<input class="formButton ui-corner-all" type="button" value="ASSIGN ROLES" onclick="javascript:addEntity('userRoleMapping')"></input>
				</td>
			</tr>
			<tr class="formSpacingRow"><td></td> </tr>
		</table>
	</div> 
</form:form>